package com.example.design.component;

public class Leaf extends Component {
    private String name;

    public Leaf(String name) {
        super(name);
        this.name = name;
    }

    @Override
    public void print() {
        System.out.println("------");
        System.out.println(getName());
    }

    public String getName() {
        return name;
    }
}
